package com.itheima.web.task;

import com.itheima.service.db.AnalysisService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AnalysisJob {
    @DubboReference
    private AnalysisService analysisService;


    //TODO 开发更换时间
//    @Scheduled(cron = "* * 0/1 * * *")
    @Scheduled(cron = "0/10 * * * * *")
    public void run() {
        System.out.println("定时分析数据");
        analysisService.logToAnalysisByDay();
    }

}
